<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1">
<title>Understanding the Image Map Example - The Java EE 5 Tutorial</title>
<meta name="robots" content="index,follow">
<meta name="robots" content="index,follow">
<meta name="date" content="2008-10-01">
<link rel="stylesheet" type="text/css" href="css/default.css">
<link rel="stylesheet" type="text/css" href="css/ipg.css">
<link rel="stylesheet" type="text/css" href="css/j5eetutorial.css">
</head>

<body>

<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tbody>
   <tr valign="top">
      <td><p class="toc level1"><a href="docinfo.html">Document Information</a></p>
<p class="toc level1 tocsp"><a href="gexaf.html">Preface</a></p>
<p class="toc level1 tocsp"><a href="gfirp.html">Part&nbsp;I&nbsp;Introduction</a></p>
<p class="toc level2"><a href="bnaaw.html">1.&nbsp;&nbsp;Overview</a></p>
<p class="toc level2"><a href="gfiud.html">2.&nbsp;&nbsp;Using the Tutorial Examples</a></p>
<p class="toc level1 tocsp"><a href="bnadp.html">Part&nbsp;II&nbsp;The Web Tier</a></p>
<p class="toc level2"><a href="bnadr.html">3.&nbsp;&nbsp;Getting Started with Web Applications</a></p>
<p class="toc level2"><a href="bnafd.html">4.&nbsp;&nbsp;Java Servlet Technology</a></p>
<p class="toc level2"><a href="bnagx.html">5.&nbsp;&nbsp;JavaServer Pages Technology</a></p>
<p class="toc level2"><a href="bnajo.html">6.&nbsp;&nbsp;JavaServer Pages Documents</a></p>
<p class="toc level2"><a href="bnakc.html">7.&nbsp;&nbsp;JavaServer Pages Standard Tag Library</a></p>
<p class="toc level2"><a href="bnalj.html">8.&nbsp;&nbsp;Custom Tags in JSP Pages</a></p>
<p class="toc level2"><a href="bnaon.html">9.&nbsp;&nbsp;Scripting in JSP Pages</a></p>
<p class="toc level2"><a href="bnaph.html">10.&nbsp;&nbsp;JavaServer Faces Technology</a></p>
<p class="toc level2"><a href="bnaqz.html">11.&nbsp;&nbsp;Using JavaServer Faces Technology in JSP Pages</a></p>
<p class="toc level2"><a href="bnatx.html">12.&nbsp;&nbsp;Developing with JavaServer Faces Technology</a></p>
<p class="toc level2"><a href="bnavg.html">13.&nbsp;&nbsp;Creating Custom UI Components</a></p>
<p class="toc level3"><a href="bnavh.html">Determining Whether You Need a Custom Component or Renderer</a></p>
<p class="toc level4"><a href="bnavh.html#bnavi">When to Use a Custom Component</a></p>
<p class="toc level4"><a href="bnavh.html#bnavj">When to Use a Custom Renderer</a></p>
<p class="toc level4"><a href="bnavh.html#bnavk">Component, Renderer, and Tag Combinations</a></p>
<div class="onpage">
<p class="toc level3 tocsp"><a href="">Understanding the Image Map Example</a></p>
<p class="toc level4"><a href="#bnavn">Why Use JavaServer Faces Technology to Implement an Image Map?</a></p>
<p class="toc level4"><a href="#bnavo">Understanding the Rendered HTML</a></p>
<p class="toc level4"><a href="#bnavp">Understanding the JSP Page</a></p>
<p class="toc level4"><a href="#bnavq">Configuring Model Data</a></p>
<p class="toc level4"><a href="#bnavr">Summary of the Application Classes</a></p>
</div>
<p class="toc level3 tocsp"><a href="bnavt.html">Steps for Creating a Custom Component</a></p>
<p class="toc level3"><a href="bnavu.html">Creating Custom Component Classes</a></p>
<p class="toc level4"><a href="bnavu.html#bnavv">Specifying the Component Family</a></p>
<p class="toc level4"><a href="bnavu.html#bnavw">Performing Encoding</a></p>
<p class="toc level4"><a href="bnavu.html#bnavx">Performing Decoding</a></p>
<p class="toc level4"><a href="bnavu.html#bnavy">Enabling Component Properties to Accept Expressions</a></p>
<p class="toc level4"><a href="bnavu.html#bnavz">Saving and Restoring State</a></p>
<p class="toc level3 tocsp"><a href="bnawa.html">Delegating Rendering to a Renderer</a></p>
<p class="toc level4"><a href="bnawa.html#bnawb">Creating the Renderer Class</a></p>
<p class="toc level4"><a href="bnawa.html#bnawc">Identifying the Renderer Type</a></p>
<p class="toc level3 tocsp"><a href="bnawd.html">Handling Events for Custom Components</a></p>
<p class="toc level3"><a href="bnawe.html">Creating the Component Tag Handler</a></p>
<p class="toc level4"><a href="bnawe.html#bnawf">Retrieving the Component Type</a></p>
<p class="toc level4"><a href="bnawe.html#bnawg">Setting Component Property Values</a></p>
<p class="toc level5"><a href="bnawe.html#bnawh">Getting the Attribute Values</a></p>
<p class="toc level5"><a href="bnawe.html#bnawi">Setting the Component Property Values</a></p>
<p class="toc level4 tocsp"><a href="bnawe.html#bnawl">Providing the Renderer Type</a></p>
<p class="toc level4"><a href="bnawe.html#bnawm">Releasing Resources</a></p>
<p class="toc level3 tocsp"><a href="bnawn.html">Defining the Custom Component Tag in a Tag Library Descriptor</a></p>
<p class="toc level2 tocsp"><a href="bnawo.html">14.&nbsp;&nbsp;Configuring JavaServer Faces Applications</a></p>
<p class="toc level2"><a href="bnaxu.html">15.&nbsp;&nbsp;Internationalizing and Localizing Web Applications</a></p>
<p class="toc level1 tocsp"><a href="bnayk.html">Part&nbsp;III&nbsp;Web Services</a></p>
<p class="toc level2"><a href="bnayl.html">16.&nbsp;&nbsp;Building Web Services with JAX-WS</a></p>
<p class="toc level2"><a href="bnazf.html">17.&nbsp;&nbsp;Binding between XML Schema and Java Classes</a></p>
<p class="toc level2"><a href="bnbdv.html">18.&nbsp;&nbsp;Streaming API for XML</a></p>
<p class="toc level2"><a href="bnbhf.html">19.&nbsp;&nbsp;SOAP with Attachments API for Java</a></p>
<p class="toc level1 tocsp"><a href="bnblr.html">Part&nbsp;IV&nbsp;Enterprise Beans</a></p>
<p class="toc level2"><a href="bnbls.html">20.&nbsp;&nbsp;Enterprise Beans</a></p>
<p class="toc level2"><a href="bnbnb.html">21.&nbsp;&nbsp;Getting Started with Enterprise Beans</a></p>
<p class="toc level2"><a href="bnboc.html">22.&nbsp;&nbsp;Session Bean Examples</a></p>
<p class="toc level2"><a href="bnbpk.html">23.&nbsp;&nbsp;A Message-Driven Bean Example</a></p>
<p class="toc level1 tocsp"><a href="bnbpy.html">Part&nbsp;V&nbsp;Persistence</a></p>
<p class="toc level2"><a href="bnbpz.html">24.&nbsp;&nbsp;Introduction to the Java Persistence API</a></p>
<p class="toc level2"><a href="bnbrl.html">25.&nbsp;&nbsp;Persistence in the Web Tier</a></p>
<p class="toc level2"><a href="bnbrs.html">26.&nbsp;&nbsp;Persistence in the EJB Tier</a></p>
<p class="toc level2"><a href="bnbtg.html">27.&nbsp;&nbsp;The Java Persistence Query Language</a></p>
<p class="toc level1 tocsp"><a href="bnbwi.html">Part&nbsp;VI&nbsp;Services</a></p>
<p class="toc level2"><a href="bnbwj.html">28.&nbsp;&nbsp;Introduction to Security in the Java EE Platform</a></p>
<p class="toc level2"><a href="bnbyk.html">29.&nbsp;&nbsp;Securing Java EE Applications</a></p>
<p class="toc level2"><a href="bncas.html">30.&nbsp;&nbsp;Securing Web Applications</a></p>
<p class="toc level2"><a href="bncdq.html">31.&nbsp;&nbsp;The Java Message Service API</a></p>
<p class="toc level2"><a href="bncgv.html">32.&nbsp;&nbsp;Java EE Examples Using the JMS API</a></p>
<p class="toc level2"><a href="bncih.html">33.&nbsp;&nbsp;Transactions</a></p>
<p class="toc level2"><a href="bncjh.html">34.&nbsp;&nbsp;Resource Connections</a></p>
<p class="toc level2"><a href="bncjx.html">35.&nbsp;&nbsp;Connector Architecture</a></p>
<p class="toc level1 tocsp"><a href="bnckn.html">Part&nbsp;VII&nbsp;Case Studies</a></p>
<p class="toc level2"><a href="bncko.html">36.&nbsp;&nbsp;The Coffee Break Application</a></p>
<p class="toc level2"><a href="bnclz.html">37.&nbsp;&nbsp;The Duke's Bank Application</a></p>
<p class="toc level1 tocsp"><a href="gexbq.html">Part&nbsp;VIII&nbsp;Appendixes</a></p>
<p class="toc level2"><a href="bncno.html">A.&nbsp;&nbsp;Java Encoding Schemes</a></p>
<p class="toc level2"><a href="bncnq.html">B.&nbsp;&nbsp;Preparation for Java EE Certification Exams</a></p>
<p class="toc level2"><a href="bncnt.html">C.&nbsp;&nbsp;About the Authors</a></p>
<p class="toc level1 tocsp"><a href="idx-1.html">Index</a></p>
</td>
      <td width="10px">&nbsp;</td>
      <td width="705px">
         <div class="header">
             <div class="header-links-top">
                 <a href="http://java.sun.com">java.sun.com</a> |
                 <a href="http://docs.sun.com/">docs.sun.com</a><br>
             </div> 
             <img src="graphics/tutorialBanner.gif" width="704" height="120" alt="The Java&trade; EE 5 Tutorial"/>
             <div class="header-links">
	         <a href="index.html">Home</a> |
                 <a href="http://java.sun.com/javaee/5/docs/tutorial/information/download.html">Download</a> |
                 <a href="http://java.sun.com/javaee/5/docs/tutorial/doc/JavaEETutorial.pdf">PDF</a> |
                 <a href="http://java.sun.com/javaee/5/docs/api/index.html">API</a> |
                 <a href="http://java.sun.com/javaee/5/docs/tutorial/information/faq.html">FAQ</a> |
                 <a href="http://java.sun.com/javaee/5/docs/tutorial/information/search.html">Search</a> |
                 <a href="http://java.sun.com/javaee/5/docs/tutorial/information/sendusmail.html">Feedback</a> |
                 <a href="http://java.sun.com/javaee/5/docs/tutorial/information/history.html">History</a>
             </div>
             <div class="navigation">
                 <a href="bnavh.html"><img style="padding-right: 3px" src="graphics/leftButton.gif" border="0"></a>
                 <a href="sjsaseej2eet.html"><img style="padding-right: 3px" src="graphics/upButton.gif" border="0"></a>
                 <a href="bnavt.html"><img style="padding-left: 3px" src="graphics/rightButton.gif" border="0"></a>
             </div>
         </div>

	 <div class="maincontent">      	 
             

<a name="bnavm"></a><h3>Understanding the Image Map Example</h3>
<p><a name="indexterm-1472"></a><a name="indexterm-1473"></a>Duke&rsquo;s Bookstore includes a custom image map component on the <tt>chooselocale.jsp</tt> page. This image
map displays a map of the world. When the user clicks one
of a particular set of regions in the map, the application sets the
locale on the <tt>UIViewRoot</tt> component of the current <tt>FacesContext</tt> to the language spoken
in the selected region. The hotspots of the map are the United States,
Spanish-speaking Central and South America, France, and Germany.</p>

<a name="bnavn"></a><h4>Why Use JavaServer Faces Technology to Implement an Image Map?</h4>
<p>JavaServer Faces technology is an ideal framework to use for implementing this kind
of image map because it can perform the work that must be
done on the server without requiring you to create a server-side image map.</p><p>In general, client-side image maps are preferred over server-side image maps for several
reasons. One reason is that the client-side image map allows the browser to
provide immediate feedback when a user positions the mouse over a hotspot. Another
reason is that client-side image maps perform better because they don&rsquo;t require round-trips
to the server. However, in some situations, your image map might need to
access the server to retrieve data or to change the appearance of non-form
controls, tasks that a client-side image map cannot do.</p><p>Because the image map custom component uses JavaServer Faces technology, it has the
best of both styles of image maps: It can handle the parts
of the application that need to be performed on the server, while allowing
the other parts of the application to be performed on the client side.</p>

<a name="bnavo"></a><h4>Understanding the Rendered HTML</h4>
<p>Here is an abbreviated version of the form part of the HTML
page that the application needs to render:</p><pre>&lt;form id="_id38" method="post"
     action="/bookstore6/chooselocale.faces" ... >
    ...
    &lt;img id="_id38:mapImage"
         src="/bookstore6/template/world.jpg"
         alt="Choose Your Preferred Locale from the Map"
         usemap="#worldMap" />
         &lt;map name="worldMap">
            &lt;area alt="NAmerica"                        
                 coords="53,109,1,110,2,167,,..."
                shape="poly"
                 onmouseout=
                    "document.forms[0][&rsquo;_id_id38:mapImage&rsquo;].src=
                        &rsquo;/bookstore6/template/world.jpg&rsquo;"
                onmouseover=
                    "document.forms[0][&rsquo;_id_id38:mapImage&rsquo;].src=
                        &rsquo;/bookstore6/template/world_namer.jpg&rsquo;"
                onclick=
                    "document.forms[0][&rsquo;worldMap_current&rsquo;].
                        value=
                            &rsquo;NAmerica&rsquo;;document.forms[0].submit()"
            />
            &lt;input type="hidden" name="worldMap_current">
        &lt;/map>
        ...
&lt;/form></pre><p>The <tt>img</tt> tag associates an image (<tt>world.jpg</tt>) with the image map referenced in
the <tt>usemap</tt> attribute value.</p><p>The <tt>map</tt> tag specifies the image map and contains a set of <tt>area</tt>
tags.</p><p>Each a<tt>rea</tt> tag specifies a region of the image map. The <tt>onmouseover</tt>, <tt>onmouseout</tt>,
and <tt>onclick</tt> attributes define which JavaScript code is executed when these events occur.
When the user moves the mouse over a region, the <tt>onmouseover</tt> function
associated with the region displays the map with that region highlighted. When the
user moves the mouse out of a region, the <tt>onmouseout</tt> function redisplays
the original image. If the user clicks on a region, the <tt>onclick</tt> function
sets the value of the <tt>input</tt> tag to the ID of the
selected area and submits the page.</p><p>The <tt>input</tt> tag represents a hidden control that stores the value of the
currently selected area between client-server exchanges so that the server-side component classes can
retrieve the value.</p><p>The server-side objects retrieve the value of <tt>worldMap_current</tt> and set the locale in
the <tt>FacesContext</tt> instance according to the region that was selected.</p>

<a name="bnavp"></a><h4>Understanding the JSP Page</h4>
<p>Here is an abbreviated form of the JSP page that the image
map component will use to generate the HTML page shown in the preceding
section:</p><pre>&lt;f:view>
    &lt;f:loadBundle basename="messages.BookstoreMessages"
         var="bundle"/>
    &lt;h:form>
        ...
        &lt;h:graphicImage id="mapImage" url="/template/world.jpg"
             alt="#{bundle.ChooseLocale}"
            usemap="#worldMap" />
         &lt;bookstore:map id="worldMap" current="NAmericas"
             immediate="true" action="bookstore"
            actionListener="#{localeBean.chooseLocaleFromMap}">
            &lt;bookstore:area id="NAmerica" value="#{NA}"
                 onmouseover="/template/world_namer.jpg"
                 onmouseout="/template/world.jpg"
                 targetImage="mapImage" />
            &lt;bookstore:area id="SAmerica" value="#{SA}"
                onmouseover="/template/world_samer.jpg"
                onmouseout="/template/world.jpg"
                 targetImage="mapImage" />
            &lt;bookstore:area id="Germany" value="#{gerA}"
                onmouseover="/template/world_germany.jpg"
                 onmouseout="/template/world.jpg"
                 targetImage="mapImage" />
            &lt;bookstore:area id="France" value="#{fraA}"
                 onmouseover="/template/world_france.jpg"
                onmouseout="/template/world.jpg"
                 targetImage="mapImage" />
            &lt;/bookstore:map>
        ...
    &lt;/h:form>
&lt;/f:view></pre><p><a name="indexterm-1474"></a><a name="indexterm-1475"></a>The <tt>alt</tt> attribute of <tt>graphicImage</tt> maps to the localized string <tt>"Choose Your Locale from the Map"</tt>.</p><p><a name="indexterm-1476"></a><a name="indexterm-1477"></a>The <tt>actionListener</tt> attribute of the <tt>map</tt> tag points at a method in <tt>LocaleBean</tt>
that accepts an action event. This method changes the locale according to the
area selected from the image map. The way this event is handled is
explained more in <a href="bnawd.html">Handling Events for Custom Components</a>.</p><p><a name="indexterm-1478"></a><a name="indexterm-1479"></a>The <tt>action</tt> attribute specifies a logical outcome <tt>String</tt>, which is matched against
the navigation rules in the application configuration resource file. For more information on
navigation, see the section <a href="bnaxf.html">Configuring Navigation Rules</a>.</p><p><a name="indexterm-1480"></a><a name="indexterm-1481"></a>The <tt>immediate</tt> attribute of the <tt>map</tt> tag is set to <tt>true</tt>, which
indicates that the default <tt>ActionListener</tt> implementation should execute during the apply request values phase
of the request-processing life cycle, instead of waiting for the invoke application phase.
Because the request resulting from clicking the map does not require any validation,
data conversion, or server-side object updates, it makes sense to skip directly to
the invoke application phase.</p><p>The <tt>current</tt> attribute of the <tt>map</tt> tag is set to the default area,
which is <tt>NAmerica</tt>.</p><p>Notice that the <tt>area</tt> tags do not contain any of the JavaScript, coordinate,
or shape data that is displayed on the HTML page. The JavaScript is
generated by the <tt>AreaRenderer</tt> class. The <tt>onmouseover</tt> and <tt>onmouseout</tt> attribute values indicate the image
to be loaded when these events occur. How the JavaScript is generated is
explained more in <a href="bnavu.html#bnavw">Performing Encoding</a>.</p><p>The coordinate, shape, and alternate text data are obtained through the <tt>value</tt> attribute,
whose value refers to an attribute in application scope. The value of this
attribute is a bean, which stores the <tt>coords</tt>, <tt>shape</tt>, and <tt>alt</tt> data. How these
beans are stored in the application scope is explained more in the next
section.</p>

<a name="bnavq"></a><h4>Configuring Model Data</h4>
<p><a name="indexterm-1482"></a><a name="indexterm-1483"></a>In a JavaServer Faces application, data such as the coordinates of a hotspot
of an image map is retrieved from the <tt>value</tt> attribute through a bean.
However, the shape and coordinates of a hotspot should be defined together because
the coordinates are interpreted differently depending on what shape the hotspot is. Because a
component&rsquo;s value can be bound only to one property, the <tt>value</tt> attribute cannot
refer to both the shape and the coordinates.</p><p><a name="indexterm-1484"></a><a name="indexterm-1485"></a>To solve this problem, the application encapsulates all of this information in a
set of <tt>ImageArea</tt> objects. These objects are initialized into application scope by the
managed bean creation facility (see <a href="bnaqm.html">Backing Beans</a>). Here is part of the managed bean
declaration for the <tt>ImageArea</tt> bean corresponding to the South America hotspot:</p><pre>&lt;managed-bean>
    ...
    &lt;managed-bean-name>SA&lt;/managed-bean-name>
    &lt;managed-bean-class>
        components.model.ImageArea
    &lt;/managed-bean-class>
    &lt;managed-bean-scope>application&lt;/managed-bean-scope>
    &lt;managed-property>
        &lt;property-name>shape&lt;/property-name>
        &lt;value>poly&lt;/value>
    &lt;/managed-property>
    &lt;managed-property>
        &lt;property-name>alt&lt;/property-name>
        &lt;value>SAmerica&lt;/value>
    &lt;/managed-property>
    &lt;managed-property>
        &lt;property-name>coords&lt;/property-name>
        &lt;value>89,217,95,100...&lt;/value>    
    &lt;/managed-property>
&lt;/managed-bean></pre><p>For more information on initializing managed beans with the managed bean creation facility,
see the section <a href="bnawp.html">Application Configuration Resource File</a>.</p><p>The <tt>value</tt> attributes of the <tt>area</tt> tags refer to the beans in the
application scope, as shown in this <tt>area</tt> tag from <tt>chooselocale.jsp</tt>:</p><pre>&lt;bookstore:area id="NAmerica"
         <b>value</b>="#{NA}"
         onmouseover="/template/world_namer.jpg"
         onmouseout="/template/world.jpg" /></pre><p>To reference the <tt>ImageArea</tt> model object bean values from the component class, you
implement a <tt>getValue</tt> method in the component class. This method calls <tt>super.getValue</tt>. The superclass
of <tt></tt><i>tut-install</i><tt>/javaeetutorial5/examples/web/bookstore6/src/java/com/sun/bookstore6/components/AreaComponent.java</tt>, <tt>UIOutput</tt>, has a <tt>getValue</tt> method that does the work of finding
the <tt>ImageArea</tt> object associated with <tt>AreaComponent</tt>. The <tt>AreaRenderer</tt> class, which needs to render the
<tt>alt</tt>, <tt>shape</tt>, and <tt>coords</tt> values from the <tt>ImageArea</tt> object, calls the <tt>getValue</tt> method of
<tt>AreaComponent</tt> to retrieve the <tt>ImageArea</tt> object.</p><pre>ImageArea iarea = (ImageArea) area.getValue();</pre><p><tt>ImageArea</tt> is only a simple bean, so you can access the shape, coordinates,
and alternative text values by calling the appropriate accessor methods of <tt>ImageArea</tt>. <a href="bnawa.html#bnawb">Creating the Renderer Class</a>
explains how to do this in the <tt>AreaRenderer</tt> class.</p>

<a name="bnavr"></a><h4>Summary of the Application Classes</h4>
<p><a href="#bnavs">Table&nbsp;13-2</a> summarizes all the classes needed to implement the image map component.</p><a name="bnavs"></a><h6>Table&nbsp;13-2 Image Map Classes</h6><table><col width="21%"><col width="78%"><tr><th align="left" valign="top" scope="column"><p>Class</p></th>
<th align="left" valign="top" scope="column"><p>Function</p></th>
</tr>
<tr><td align="left" valign="top" scope="row"><p><tt>AreaSelectedEvent</tt></p></td>
<td align="left" valign="top" scope="row"><p>The <tt>ActionEvent</tt>
indicating that an <tt>AreaComponent</tt> from the <tt>MapComponent</tt> has been selected.</p></td>
</tr>
<tr><td align="left" valign="top" scope="row"><p><tt>AreaTag</tt></p></td>
<td align="left" valign="top" scope="row"><p><a name="indexterm-1486"></a>The tag handler
that implements the <tt>area</tt> custom tag.</p></td>
</tr>
<tr><td align="left" valign="top" scope="row"><p><tt>MapTag</tt></p></td>
<td align="left" valign="top" scope="row"><p>The tag handler that implements the <tt>map</tt> custom
tag.</p></td>
</tr>
<tr><td align="left" valign="top" scope="row"><p><tt>AreaComponent</tt></p></td>
<td align="left" valign="top" scope="row"><p>The class that defines <tt>AreaComponent</tt>, which corresponds to the <tt>area</tt> custom tag.</p></td>
</tr>
<tr><td align="left" valign="top" scope="row"><p><tt>MapComponent</tt></p></td>
<td align="left" valign="top" scope="row"><p>The class
that defines <tt>MapComponent</tt>, which corresponds to the <tt>map</tt> custom tag.</p></td>
</tr>
<tr><td align="left" valign="top" scope="row"><p><tt>AreaRenderer</tt></p></td>
<td align="left" valign="top" scope="row"><p>This <tt>Renderer</tt> performs the
delegated rendering for <tt>AreaComponent</tt>.</p></td>
</tr>
<tr><td align="left" valign="top" scope="row"><p><tt>ImageArea</tt></p></td>
<td align="left" valign="top" scope="row"><p>The bean that stores the shape and coordinates of
the hotspots.</p></td>
</tr>
<tr><td align="left" valign="top" scope="row"><p><tt>LocaleBean</tt></p></td>
<td align="left" valign="top" scope="row"><p>The backing bean for the <tt>chooselocale.jsp</tt> page.</p></td>
</tr>
</table><p>The Duke's Bookstore source directory, called <i>bookstore-dir</i>, is <tt></tt><i>tut-install</i><tt>/javaeetutorial5/examples/web/bookstore6/src/java/com/sun/bookstore6/</tt>. The event and listener
classes are located in <tt></tt><i>bookstore-dir</i><tt>/listeners/</tt>. The tag handlers are located in <tt></tt><i>bookstore-dir</i><tt>/taglib/</tt>. The component
classes are located in <tt></tt><i>bookstore-dir</i><tt>/components/</tt>. The renderer classes are located in <tt></tt><i>bookstore-dir</i><tt>/renderers/</tt>.
<tt>ImageArea</tt> is located in <tt></tt><i>bookstore-dir</i><tt>/model/</tt>. <tt>LocaleBean</tt> is located in <tt></tt><i>bookstore-dir</i><tt>/backing/</tt>.</p>
         </div>
         <div class="navigation">
             <a href="bnavh.html"><img style="padding-right: 3px" src="graphics/leftButton.gif" border="0"></a>
             <a href="sjsaseej2eet.html"><img style="padding-right: 3px" src="graphics/upButton.gif" border="0"></a>
             <a href="bnavt.html"><img style="padding-left: 3px" src="graphics/rightButton.gif" border="0"></a>
         </div>

         <div class="copyright">
      	    <p>The material in The Java&trade; EE 5 Tutorial is <a href='docinfo.html'>copyright</a>-protected and may not be published in other works without express written permission from Sun Microsystems.</p>
      	 </div>

      </td>
   </tr>
</tbody>
</table>
</body>
</html>

